package com.ocom.ugcapi.mq.product;

import com.ocom.amqp.core.DelayQueue;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class ServiceChargesProduct {

	@Resource
	private RabbitTemplate rabbitTemplate;

	@Resource(name = "serviceChargesDelayQueue")
	private DelayQueue delayQueue;

	public void sendDelayMessage(String message) {
		//确认收到
		this.rabbitTemplate.convertAndSend(delayQueue.getSendExchangeName(), delayQueue.getRoutingKey(), message);
	}

}